<div class="header">
    <div class="layui-container">
            <a href="/" class="logo"><img src="{:seo('image')}"></a>
            <!--手机端按钮-->
         <div class="menuBar" style="margin-right:15px;">
                <ul>
                    <li class="bar_top"></li>
                    <li class="bar_mid"></li>
                    <li class="bar_foot"></li>
                </ul>
            </div>
            <!--导航菜单-->
          
<ul class="layui-nav" lay-filter="demo-filter-nav" id="menu">
     <li class="layui-nav-item"><a href="/">首页</a></li>
                {foreach $cat as $vo}
      <li class="layui-nav-item">
                  {if $vo.child}
    <a href="javascript:;">{$vo.cat_name}<i class="layui-icon layui-icon-down layui-nav-more"></i></a>
    <dl class="layui-nav-child layui-anim layui-anim-upbit">
                     {foreach $vo.child as $v}
      <dd><a href="{:url('column/index?ZcT=' . base64_encode($v['id']) . '')}">{$v.cat_name}</a></dd>
                        {/foreach}
                       {else/}
      <dd><a href="{:url('column/index?ZcT=' . base64_encode($vo['id']) . '')}">{$vo.cat_name}</a></dd>
    </dl>
                        {/if}
                    </li>
                    {/foreach}
 {if(empty(ishone()))}<li class="layui-nav-item" style="margin-left: 150px;">{else/}<li class="layui-nav-item">{/if}
    <a href="javascript:;"><i class="layui-icon layui-icon-user">&nbsp;</i>{$user['username']|default="value"}<i class="layui-icon layui-icon-down layui-nav-more"></i></a>
                        {if !empty($user)}
    <dl class="layui-nav-child layui-anim layui-anim-upbit">
      <dd><a href="{:url('user/index')}"><i class="layui-icon layui-icon-username">&nbsp;</i>{:__('Membership Center')}</a></dd>
      <dd><a href="{:url('user/logout')}" onclick="return confirm('确认要安全退出？');"><i class="layui-icon layui-icon-logout">&nbsp;</i>{:__('Log out')}</a></dd>
    </dl> 
    {else/}
    <dl class="layui-nav-child">
      <dd><a href="{:url('user/login')}"><i class="layui-icon layui-icon-spread-left">&nbsp;</i>{:__('Sign in now')}</a></dd>
      <dd><a href="{:url('user/register')}"><i class="layui-icon layui-icon-shrink-right">&nbsp;</i>{:__('Register now')}</a></dd>
    </dl> 
                           {/if}
  </li>
</ul>
    
            <div class="layui-clear"></div>
        </div>
    </div>

<script  type="text/javascript"> 
var  a  =  document.getElementsByTagName('a');
var  url  =  document.URL;
for(var i=0;i<a.length;i++){
     if(a[i].href  ===  url){
          a[i].classList.add("layui-this");
     }
}

   </script>